<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Design by Free CSS Templates
http://www.freecsstemplates.org
Released for free under a Creative Commons Attribution 2.5 License

Name       : Compromise
Description: A two-column, fixed-width design with dark color scheme.
Version    : 1.0
Released   : 20081103
-->
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head profile="http://gmpg.org/xfn/11">
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <title>{% block title %} {{ blog.title}}{% endblock %}</title>
  <link rel="stylesheet" href="/themes/{{ blog.theme_name }}/style.css" type="text/css" media="screen" />
  <link rel="stylesheet" href="/static/styles/highlight.css" type="text/css" media="screen" />
  <link rel="alternate" type="application/rss+xml" title="{{ blog.title }} RSS Feed" href="{{ blog.feedurl }}" />
  <link href="/static/wlwmanifest.xml" type="application/wlwmanifest+xml" rel="wlwmanifest"/>
  <script type="text/javascript" src="/themes/{{ blog.theme_name }}/rounded_corners_lite.inc.js"></script>

{% block head_block %}{% endblock %} 
<script type="text/JavaScript">
window.onload = function()
{
settings = {
tl: { radius: 5 },
tr: { radius: 5 },
bl: { radius: 5 },
br: { radius: 5 },
antiAlias: true,
autoPad: true,
validTags: ["div","p","ul"]
}
var myBoxObject = new curvyCorners(settings, "meta");
myBoxObject.applyCornersToAll();
var myBoxObject = new curvyCorners(settings, "menu");
myBoxObject.applyCornersToAll();
var myBoxObject = new curvyCorners(settings, "sidebar");
myBoxObject.applyCornersToAll();
var myBoxObject = new curvyCorners(settings, "footer");
myBoxObject.applyCornersToAll();
var myBoxObject = new curvyCorners(settings, "toc");
myBoxObject.applyCornersToAll();
}

var pretop = 0;
window.onscroll = function()
{
   scrolltop = document.documentElement.scrollTop || window.pageYOffset;
   var sidebar = document.getElementById ('sidebar');
   if (sidebar && (scrolltop < pretop - 200 || (Math.abs(scrolltop - pretop) > sidebar.offsetHeight)))
   {  
      if (scrolltop<200)
      {
         sidebar.style.top = 0 + 'px';
         pretop = 0;
      }
      else
      {
	      sidebar.style.top = scrolltop + 'px';
	      pretop = scrolltop;  
      }
   }
}
</script>
</head> 

<body>
	<div id="header">
		<div id="logo">
			<h1><a href="{{blog.baseurl}}/" title="{{blog.title}}">{{blog.title}}</a></h1>
		</div>
		<div id="search">
			<ul>
			<li><img alt="rss" src="/themes/{{ blog.theme_name }}/images/feed-16x16.png"/> </li>
			<li><a href="{{blog.feedurl}}">RSS</a> |</li> 
			{%if self.is_admin%}
			<li><a href="/admin">Admin</a> |</li> 
			{%endif%}
			<li>
			{%if self.is_login%}
			<a href="{{self.logouturl}}">Logout</a>
			{%else%}
			<a href="/login">Login</a>
			{%endif%}
			|</li>
		</ul>			
		</div>
		<div id="search">
		 <form method="get" id="searchform" action="http://www.google.com/search">
		  <input type="text" value="Search..." onfocus="if (this.value == 'Search...') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search...';}" name="as_q" id="s" />
		  <input type="submit" id="go" alt="Search" value="Search" />
		  <input name="as_sitesearch" value="{{blog.domain}}" type="hidden">
		 </form>
    </div>
	</div> 
	<!-- end #header -->
	<div id="menu" class="menu">
		<ul>
			<li class="{%if ishome%}current_page_item{%else%}page_item{%endif%}"><a  href="{{ blog.baseurl }}">Home</a></li>
			{{self.m_list_pages}}
			{% block topmenu %}{% endblock %}

		</ul>
	</div>
	<!-- end #menu -->

<div id="wrapper">
 <div class="btm">
    {%block content %}{%endblock%}
 </div>
</div>

<div id="footer" class="footer">
		<p>{{blog.title}} is proudly powered by <a href="http://xuming.net">Micolog</a>. 
			Theme by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>
		</p>
</div>
<!-- end #footer -->
{%if blog.enable_google_analytics %}
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-4033878-3");
pageTracker._trackPageview();
} catch(err) {}</script>
{%endif%}
</body>
</html>